define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

		//返回信息
		return {
			//订单列表。time：0：当月，1：上月
			getList: function(store_id, time, nPage, callback, calldone) {
				Http.post({
					method: 'member.agenter.orderlist',
					store_id:store_id,
					time: time,
					nPage:nPage,
					pagelimit:15
				}, function(result) {
					if(callback)
						callback(result.result);
				}, function(e) {

				}, function() {
					if(calldone)
						calldone();
				});
			}
			//
			
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Myagentsale", factory);
});